//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.rjxy.demo.server.impl;

import com.rjxy.demo.mapper.HeroInfoMapper;
import com.rjxy.demo.pojo.HeroInfo;
import com.rjxy.demo.server.HeroInfoServer;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HeroInfoServerImpl implements HeroInfoServer {
    @Autowired
    private HeroInfoMapper heroInfoMapper;

    public HeroInfoServerImpl() {
    }

    public List<HeroInfo> getAll() {
        return this.heroInfoMapper.selectAll();
    }

    public HeroInfo getByHid(Integer hid) {
        return this.heroInfoMapper.selectByHid(hid);
    }

    public int saveHero(HeroInfo hero) {
        return this.heroInfoMapper.insertHero(hero);
    }

    public int updateHero(HeroInfo heroInfo) {
        return this.heroInfoMapper.updateHero(heroInfo);
    }

    public int removeHero(Integer hid) {
        return this.heroInfoMapper.deleteHero(hid);
    }
}
